#ifndef _RECTANGLE_H_
#define _RECTANGLE_H_

#include "Shape.h"

class MyRectangle: public Shape
{
	int m_height, m_width;

public:
	//c'tor
	MyRectangle(): m_height(0),m_width(0){};
	//c'tor with file
	MyRectangle( ifstream &in_file, bool binary = true);
	//copy c'tor
	MyRectangle( MyRectangle &other);
	
	//virtuals
	virtual void draw(char sign = '*');
	virtual void drawWithHiding(char sign = '*');
	virtual bool isInShape(int x,int y);
	virtual void setShape();
	virtual Shape* copyShape(const Shape* other);
	virtual void drawToBuffer( screen &scr);
	virtual void calcShapeMove(ShapeContainer &work_cont, list<Shape*>::iterator itr, bool withTransfer);
	virtual void save(ofstream &out_file,bool binary);

	//my rectangle local functions
	int getWidth()const {return m_width;}
	int getHeight()const {return m_height;}
	void calcMoveAux(list<Shape*>::iterator itr, ShapeContainer &work_cont, bool withTransfer);
};

#endif
